<div id="website" style="background-color: #F7F7F7;width:85%;height: 100%;float: right;overflow:auto;">
    <div style="width: 100%;height: 50px;background-color: #B9FFD1;"><h3 style="padding: 10px 2%;margin: 0px;">管理站点</h3></div>
    <table border='1'><tr><td>站点ID</td><td>站点名</td><td>运行状态（1为正常）</td></tr>
<?php
if($status!=1){
    exit("<script>window.location.replace(\"./index.php?pa=1\")</script>");
}else{
    //echo "<table border='1'><tr><td>站点ID</td><td>站点名</td><td>运行状态（1为正常）</td></tr>";
    $result = mysqli_query($con,"SELECT * FROM star_php_website WHERE status='1'");
    while($row = mysqli_fetch_array($result)){
        echo "<tr><td>".$row['id']."</td><td>".$row["name"]."</td><td>".$row["status"]."<button onclick='window.location.replace(\"./index.php?mode=off&id=".$row["id"]."\")'>关闭</button><button onclick='window.location.replace(\"./index.php?mode=del&id=".$row["id"]."\")'>删除</button><p style='color: red;float:right;margin:0px;'>（不会删除文件）</p></td></tr>";
    }
    $result = mysqli_query($con,"SELECT * FROM star_php_website WHERE status='0'");
    while($row = mysqli_fetch_array($result)){
        echo "<tr><td>".$row['id']."</td><td>".$row["name"]."</td><td>".$row["status"]."<button onclick='window.location.replace(\"./index.php?mode=open&id=".$row["id"]."\")'>开启</button><button onclick='window.location.replace(\"./index.php?mode=del&id=".$row["id"]."\")'>删除</button><p style='color: red;float:right;margin:0px;'>（不会删除文件）</p></td></tr>";
    }
    echo "</table>";
}

?>
    <br>
    <button onclick='$("#off_site").show();$("#make_website").hide();$("#new_site_div_f").show();' id='make_website' style='background-color:green;color:white;'>新建站点</button>
    <button onclick='$("#off_site").hide();$("#make_website").show();$("#new_site_div_f").hide();' id='off_site' style='display:none;background-color:green;color:white;'>取消</button>
    <form action="./index.php" method="get" style="display: none;" id="new_site_div_f">
        <p>请输入站点名（英文）:<input name="name" type="text"></p>
        <input name="mode" value="new_site" style="display: none;">
        <p>请选择部署模式：<input name="mode_site" type="radio" value="no" checked="checked">默认框架<input name="mode_site" type="radio" value="code">验证码框架<a href='../docs/code.html'>使用文档</a><input name="mode_site" type="radio" value="email">SMTP发件框架</p>
        <input type='submit'>
    </from>
</div>